﻿// *********************************************************************
// * Copyright © 2013 Thomas Due
// *
// * This file is the property of Thomas Due and may not be 
// * distributed without the written consent of the author.    
// ********************************************************************

using System.Windows.Forms;
using Microsoft.Practices.Unity;
using SqlPad.Interfaces;
using SqlPad.Library;
using SqlPad.Library.Interfaces;
using SqlPad.UI;

namespace SqlPad
{
    public class ContainerFactory : QueryFactory, IContainerFactory
    {
        public ContainerFactory() : base()
        {
             Container
                .RegisterType<Form, SqlPadMainForm>("MainForm")
                .RegisterInstance<IContainerFactory>(this);
        }

        public Form ResolveMainForm()
        {
            return Container.Resolve<Form>("MainForm");
        }
    }
}
